LINK_TARGET = airhog
CC				= gcc
CFLAGS	= -g
DEPS = AirHog.h


MAIN = AirHog.c

SRCS = $(MAIN)
OBJS	= ${SRCS:.c=.o}


all : $(LINK_TARGET) client

client: client.rs
	rustc client.rs

$(LINK_TARGET) : $(OBJS)
	$(CC) -o $@ $^ 

%.o: %.c
	gcc $(CFLAGS) -c $*.c -o $*.o 

debug :
	gdb $(LINK_TARGET)

test:
	curl -X POST 127.0.0.1:8080 --fail --silent --show-error 1>/dev/null
	curl 127.0.0.1:8080 --fail --silent --show-error 1>/dev/null

clean : 
	rm -f *.o
	rm -f $(LINK_TARGET)
	rm -f client
	echo Clean done

